package com.igor.bookStore.service;

import java.util.Collection;
import java.util.HashMap;
import java.util.Map;

import com.igor.bookStore.inface.Customer;

public class CustomersBean implements Customers {

	private Map<String, Customer> customers = new HashMap<String, Customer>();
    
    public Collection<Customer> retrieve() {
            return customers.values();
    }

    public Customer save(Customer customer) {
            return customers.put(customer.getName(), customer);
    }
    
    public Customer retrieveSingleCustomer(String name) {
            return customers.get(name);
    }


}
